<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var str="Dog";
			var reg=/dog/gi;
			console.log(reg.test(str));
			
			var s2="Dog is our friends,dog are not a animal";
			var s3=s2.replace(reg,"Cat");
			console.log(s3);
			//var s4="老刘的手机号是14890001444";
			var s4="14890001444";
			//var reg2=/1\d{10}/;
			var reg2=/^1\d{10}$/;
			alert(reg2.test(s4));
		</script>
	</head>
	<body>
	</body>
</html>